'''
此案例演示csv文件的操作
'''
import csv
#newline = ''，去掉行与行之间的空格
with open('fengyun.csv','w',newline='') as f:
    write = csv.writer(f)
    write.writerow(['聂风','血饮狂刀'])
    write.writerow(['步惊云','绝世好剑'])
#'a':add增加
f = open('fengyun.csv','a',newline='')
write = csv.writer(f)
write.writerow(['断浪','麒麟剑'])
f.close()
